package com.tlgen.schedule;

import com.tlgen.service.HeartBeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/*
 *@title StartupSchedule
 *@description
 *@author ta151486
 *@version 1.0
 *@create 2023/12/13 9:37
 */
@Component
public class StartupSchedule {

    @Autowired
    private HeartBeatService heartBeatService;

    @Scheduled(cron = "1/12 * * * * ?")
    public void executeBeat() {
        heartBeatService.sendBeat();
    }

    @Scheduled(cron = "1/1 * * * * ?")
    public void executeRemove() {
        heartBeatService.remove();
    }

}
